<?php

namespace App\Models;

use App\Models\Traits\Btn;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\user as AuthUser;

class User extends AuthUser
{
    use HasFactory;
    use SoftDeletes;//使用软删除
    use Btn;



    //拒绝不添加的字段
    protected $guarded=[];

    public function role()
    {
        return $this->hasOne(Role::class,'id','role_id');
    }
}
